import Vue from 'vue'
import Router from 'vue-router'
const apps = resolve => require(['./app.vue'], resolve)
// 兼容小程序

// 未兼容小程序
const orderDetail = resolve => require(['./components/orderDetail.vue'], resolve)
const invitationNew = resolve => require(['./components/invitationNew'],resolve);
const invitationRegister = resolve => require(['./components/invitationRegister'], resolve)
const invitation = resolve => require(['./components/invitation'], resolve)
const carHelp = resolve => require(['./components/help'], resolve)
const carHelpNew = resolve => require(['./components/helpNew'], resolve)
const helpPage1 = resolve => require(['./components/helpPage1'], resolve)
const helpPage2 = resolve => require(['./components/helpPage2'], resolve)
const tripCard = resolve => require(['./components/tripCard'], resolve)
const meituanCom = resolve => require(['./components/meituanCom'],resolve);
const userGuide = resolve => require(['./components/userGuide'],resolve);
const register = resolve => require(['./components/register'], resolve);//注册改版
const register600 = resolve => require(['./components/register600'], resolve);//注册改版
const D2 = resolve => require(['./components/D2'], resolve)
const D2S = resolve => require(['./components/D2S'], resolve)
// const xlsx = resolve => require(['./components/test1'], resolve)
const myTrips = resolve => require(['./components/myTrips'], resolve)//我的行程
const topUpHistory = resolve => require(['./components/topUpHistory'], resolve)//充值历史
const activityList = resolve => require(['./components/activityList'], resolve)//活动列表

const invitationRegisterNew = resolve => require(['./components/invitationRegisterNew'],resolve);
const invitationNew1 = resolve => require(['./components/invitationNew1'],resolve);
const invitationRegisterNew1 = resolve => require(['./components/invitationRegisterNew1'],resolve);
const invitationNew2 = resolve => require(['./components/invitationNew2'],resolve);
const invitationRegisterNew2 = resolve => require(['./components/invitationRegisterNew2'],resolve);
// 邀请一套，通用版
const invitationGeneral = resolve => require(['./components/invitationGeneral'],resolve);
const invitationRegisterGeneral = resolve => require(['./components/invitationRegisterGeneral'],resolve);
const invitationRegisterGeneral600 = resolve => require(['./components/invitationRegisterGeneral600'],resolve);
// console.log(helpPage1);

Vue.use(Router)


const routes = {
  path: "/",
  component: apps,
  children: [
    { path: "/app/activityList", component: activityList, name: "活动列表" },
    { path: "/app/topUpHistory", component: topUpHistory, name: "充值历史" },
    { path: "/app/myTrips", component: myTrips, name: "我的行程" },
    // {path: '/app/xlsx', component: xlsx, name: '下拉刷新'},
    { path: "/app/register", component: register, name: "注册（7.17）" },
    { path: "/app/register600", component: register600, name: "注册（600）" },
    { path: "/app/userGuide", component: userGuide, name: "用户指南" },
    { path: "/app/tripCard", component: tripCard, name: "购物赠骑行卡" },
    {
      path: "/app/meituanCom",
      component: meituanCom,
      name: "美团购物赠骑行卡"
    },
    { path: "/app/orderDetail", component: orderDetail, name: "用车时间" },
    {
      path: "/app/invitationRegister",
      component: invitationRegister,
      name: "注册送券"
    },
    {
      path: "/app/invitationRegisterNew",
      component: invitationRegisterNew,
      name: "注册送券(18)"
    },
    {
      path: "/app/invitationRegisterNew1",
      component: invitationRegisterNew1,
      name: "注册送券(88)"
    },
    {
      path: "/app/invitationRegisterNew2",
      component: invitationRegisterNew2,
      name: "注册送券(西店)"
    },
    { path: "/app/invitation", component: invitation, name: "邀请有礼" },
    {
      path: "/app/invitationNew",
      component: invitationNew,
      name: "邀请有礼(新)"
    },
    {
      path: "/app/invitationNew1",
      component: invitationNew1,
      name: "邀请有礼new"
    },
    {
      path: "/app/invitationNew2",
      component: invitationNew2,
      name: "邀请有礼-西店"
    },
    {
      path: "/app/invitationGeneral",
      component: invitationGeneral,
      name: "邀请有礼-通用"
    },
    {
      path: "/app/invitationRegisterGeneral",
      component: invitationRegisterGeneral,
      name: "注册送券(通用)"
    },
    {
      path: "/app/invitationRegisterGeneral600",
      component: invitationRegisterGeneral600,
      name: "注册送券(600)"
    },
    { path: "/app/D2", component: D2, name: "D2用车帮助" },
    { path: "/app/D2S", component: D2S, name: "D2S用车帮助" },
    { path: "/app/help", component: carHelp, name: "用车帮助" },
    {
      path: "/app/carHelpNew",
      component: carHelpNew,
      name: "新用车帮助",
      children: [
        { path: "/app/helpPage1", component: helpPage1, name: "2轮用车帮助" },
        { path: "/app/helpPage2", component: helpPage2, name: "4轮用车帮助" }
      ]
    },
    { path: "/app/help1", component: helpPage1, name: "2轮用车帮助" },
    { path: "/app/help2", component: helpPage2, name: "4轮用车帮助" }
  ]
};

export default routes
